import * as ajaxRequest from "../ajaxRequest";

import environment from "@/environment/index";

/**
 * 获取产品属性数据管理
 * @param {*} option 
 */
// 列表请求
export const getList = options => {
    return ajaxRequest.get(`${environment.productApi}/api/v1/Product/GetChannelList`, options);
};
// 详情请求
export const getDetail = (channel, product) => {
    return ajaxRequest.get(`${environment.productApi}/api/v1/Product/getchanneldetail/${channel}/${product}`);
};
// 新增请求
export const postCreate = options => {
    return ajaxRequest.post(`${environment.productApi}/api/v1/Product/BatchCreateChannelProduct`, options);
};
//编辑请求
export const putEdit = options => {
    return ajaxRequest.put(`${environment.productApi}/api/v1/Product/EditChannelProduct`, options);
};
// 产品下架
export const putOfflone = options => {
    return ajaxRequest.put(`${environment.productApi}/api/v1/Product/OfflineChannelProduct`, options);
};
// 产品上架
export const putOnline = options => {
    return ajaxRequest.put(`${environment.productApi}/api/v1/Product/OnlineChannelProduct`, options);
};


